package com.imooc.order.exception;

import com.imooc.order.enums.ResultEnum;

import lombok.Getter;

/**
 * 
 * @author Jack
 * @date 2019-01-02
 */
@SuppressWarnings("serial")
@Getter
public class OrderException extends RuntimeException {

	/** 错误码 **/
	private Integer code;

	public OrderException(Integer code, String message) {
		super(message);
		this.code = code;
	}
	
	public OrderException(ResultEnum resultEnum) {
		super(resultEnum.getMsg());
		this.code = resultEnum.getCode();
	}
	
}
